﻿@model FCNS.ERP.Models.ErpCorS

@{
    ViewBag.Title = ((int)ViewData["IsP"] == 1 ? "客户资料" : "供应商资料")+" - 编辑";
    Layout = "~/Views/Shared/_Layout.cshtml";;
}
@Scripts.Render("~/bundles/Tabs")
@Styles.Render("~/Content/TabsCss")
<script>
    $(document).ready(function () {
        $("#tabs").tabs();

        $(":button").click(function () {
            $("#WeiXin").attr("value", "");
            alert("已清空");
        });
    });
</script>
<h2>@ViewBag.Title</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.IsDefault)
        @Html.HiddenFor(model=>model.SecretKey)
        @Html.HiddenFor(model => model.WeiXin)
        @Html.HiddenFor(model => model.AliPay)

        <input type="submit" value="保存" class="btn btn-default" />
        <p></p>
        <div id="tabs">
            <ul>
                <li><a href="#tabs-1">常规</a></li>
                <li><a href="#tabs-2">企业</a></li>
                <li><a href="#tabs-3">个人</a></li>
                <li><a href="#tabs-4">其它</a></li>
            </ul>

            <div id="tabs-1">

                <div class="form-group">
                    @Html.LabelFor(model => model.Enable, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        <div class="checkbox">
                            @Html.EditorFor(model => model.Enable)
                            @Html.ValidationMessageFor(model => model.Enable, "", new { @class = "text-danger" })
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.IsPersonal, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        <div class="checkbox">
                            @Html.EditorFor(model => model.IsPersonal)
                            @Html.ValidationMessageFor(model => model.IsPersonal, "", new { @class = "text-danger" })
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.CategoryCorSId, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.DropDownList("CategoryCorSId", ViewData["CategoryCorS"] as SelectList, htmlAttributes: new { @class = "form-control" })
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.Tel, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Tel, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Tel, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.Email, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.Address, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Address, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Address, "", new { @class = "text-danger" })
                    </div>
                </div>
            </div>

            <div id="tabs-2">

                <div class="form-group">
                    @Html.LabelFor(model => model.Corporation, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Corporation, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Corporation, "", new { @class = "text-danger" })
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(model => model.TaxNO, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.TaxNO, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.TaxNO, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.BankName, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.BankName, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.BankName, "", new { @class = "text-danger" })
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.BankNO, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.BankNO, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.BankNO, "", new { @class = "text-danger" })
                    </div>
                </div>

            </div>

            <div id="tabs-3">
                <div class="form-group">
                    @Html.LabelFor(model => model.IsMan, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        <div class="checkbox">
                            @Html.EditorFor(model => model.IsMan)
                            @Html.ValidationMessageFor(model => model.IsMan, "", new { @class = "text-danger" })
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.Card, htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Card, new { htmlAttributes = new { @class = "form-control" } })
                        @Html.ValidationMessageFor(model => model.Card, "", new { @class = "text-danger" })
                    </div>
                </div>
            </div>

            <div id="tabs-4">
                <div class="form-group">
                    <input type="button" value="移除微信绑定" class="btn btn-danger" />
                    警告：此操作将解除其相关会员的绑定.
                </div>
            </div>
        </div>

    </div>
}

    <div>
        <a class="backToListImg" href="/Basic/CorS?isP=@ViewData["IsP"]">返回</a>
    </div>
 
